<%

If int(T_Flag)=0 Then
T_Flag=1
End if

SQLtarget="select id,userid,calendarTitle,calendarFlag,calendarFinType,calendarMPlan,calendarDate from Plan_calendar where calendarFinType<>10 and calendarFlag="&T_Flag&" and userid='"&session("AnyPIM_userID")&"' order by calendarMPlan,calendarFlag,calendarDate"

rs.open sqltarget,conn,1,1
Event_count=rs.recordcount
%>
<TABLE CELLSPACING='1' CELLPADDING='1' WIDTH='100%' align='center' >
<TR>
<TD style='BORDER: #cccccc 0px solid;' width='36' align='center'>
<img src="img/Flag_Big_<%=T_Flag%>.png" border="0" alt="">
</TD>
<TD bgcolor='<%=ShowFlagColor(T_Flag)%>' style='BORDER-top: #cccccc 1px solid;'>&nbsp;
<B><font size="4"><%=ShowFlagName(T_Flag)%>&nbsp;[<%=Event_count%>]</font></B>
</TD>
</Tr>
<%
If rs.recordcount<>0 then
For Y=1 To rs.recordcount
TS_Flag=int(rs("calendarFlag"))
T_id=int(rs("calendarMPlan"))
%>
<TR>
<TD width='36' align='center'>
&nbsp;</TD>
<TD >
<A HREF="EventMonth.asp?ObjectiveID=<%=T_id%>"><img src="img/month.png"  border="0" alt="月视图"></A>
<font style= "background:<%=ShowFlagColor(TS_Flag)%>"><a href="ObjectiveView.asp?ID=<%=T_id%>"><b><u><%=ShowTargetTitle(T_id)%></u></b></a></font>
<A HREF="EventEdit.asp?ID=<%=int(rs("id"))%>" >
<u><%=Trim(rs("calendarTitle"))%></u>
</A>
</TD>
</TR>
<%
rs.moveNext
Next
Else
%>
<TR>
<TD width='36' align='center'>
&nbsp;</TD>
<TD ><a href="EventAdd.asp">暂无Event事件，请添加</a></TD>
</TR>
<%
End if
rs.close
%>
</Table>
